fn main() {
	name := 'Bob'
	assert name.len == 3      // the length is 3
	assert name[0] == u8(66)  // indexing gives a byte
	assert name[1..3] == 'ob' // slicing gives a string 'ob'

	windows_newline := '\r\n' // escape special charaters like in C
	assert windows_newline.len == 2
	
	assert '\xc0'[0] == u8(0xc0)  // \x## notation where # is a hex digit for arbitrary bytes
	aardvark_str := '\x61ardvark' 
	assert aardvark_str == 'aardvark'
	
	aardvark_str2 := '\141ardvark' // \### notation where # is an octal digit
	assert aardvark_str2 == 'aardvark'
	
	// Unicode can be specified directly as \u#### where # is hex digit 
	// and will be converted internally to its UTF-8 representation
	star_str := '\u2605' // ★
	assert star_str == '★'
	assert star_str == '\xe2\x98\x85'
	
	// a string is a read-only array of bytes.
	// all unicode charaters are encoded using UTF-8
	s := 'hello 🌎' // emoji takes 4 bytes
	assert s.len == 10
	
	arr := s.bytes() // convert string to []u8
	assert arr.len == 10
	
	s2 := arr.bytestr() // convert []byte to string
	assert s2 == s
	
	// string values are immutable, you cannot mutate elements
	mut s_mut := 'hello 🌎'
	// s_mut[0] = 'H' // not allowed
	
	// indexing a string will produce a byte, not a rune nor another string, not unicode code point
	country := 'Netherlands'
	println(country[0])             // 78
	println(country[0].ascii_str()) // N
	
	// both single and double quotes can be used to denote strings
	// vfmt converts double quotes to single quotes unless the string contains a single quote character
	// for raw strings, prepend r to disable escape-handling
	s_raw := r'hello\nworld'
	println(s_raw) // hello\nworld

	// strings can be easily converted to integers
	s_int := '42'
	n := s_int.int() // 42
	
	// all int literals are supported
	assert '0xc3'.int() == 195
	assert '0o10'.int() == 8
	assert '0b1111_0000_1010'.int() == 3850
	assert '-0b1111_0000_1010'.int() == -3850
}
